﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeLine3d : OdGeLinearEnt3d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeLine3d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeLine3d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeLine3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeLine3d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeLine3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeLine3d() : this(GlobalsPINVOKE.new_OdGeLine3d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeLine3d(OdGeLine3d source) : this(GlobalsPINVOKE.new_OdGeLine3d__SWIG_1(OdGeLine3d.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeLine3d(OdGePoint3d point, OdGeVector3d vect) : this(GlobalsPINVOKE.new_OdGeLine3d__SWIG_2(OdGePoint3d.getCPtr(point), OdGeVector3d.getCPtr(vect)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeLine3d(OdGePoint3d point1, OdGePoint3d point2) : this(GlobalsPINVOKE.new_OdGeLine3d__SWIG_3(OdGePoint3d.getCPtr(point1), OdGePoint3d.getCPtr(point2)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public static OdGeLine3d kXAxis
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGeLine3d_kXAxis_get();
				OdGeLine3d result = (intPtr == IntPtr.Zero) ? null : new OdGeLine3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
		}

		public static OdGeLine3d kYAxis
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGeLine3d_kYAxis_get();
				OdGeLine3d result = (intPtr == IntPtr.Zero) ? null : new OdGeLine3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
		}

		public static OdGeLine3d kZAxis
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGeLine3d_kZAxis_get();
				OdGeLine3d result = (intPtr == IntPtr.Zero) ? null : new OdGeLine3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
		}

		public OdGeLine3d set(OdGePoint3d point, OdGeVector3d vect)
		{
			OdGeLine3d result = new OdGeLine3d(GlobalsPINVOKE.OdGeLine3d_set__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(point), OdGeVector3d.getCPtr(vect)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeLine3d set(OdGePoint3d point1, OdGePoint3d point2)
		{
			OdGeLine3d result = new OdGeLine3d(GlobalsPINVOKE.OdGeLine3d_set__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(point1), OdGePoint3d.getCPtr(point2)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeLine3d Assign(OdGeLine3d line)
		{
			OdGeLine3d result = new OdGeLine3d(GlobalsPINVOKE.OdGeLine3d_Assign(this.swigCPtr, OdGeLine3d.getCPtr(line)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
